package com.yunshang.shoppingmall.shopping.productApi.controller;

import com.yunshang.shoppingmall.common.MessageConstants;
import com.yunshang.shoppingmall.common.Response;
import com.yunshang.shoppingmall.entity.Panner;
import com.yunshang.shoppingmall.service.PannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
public class PannerController {

    @Autowired
    PannerService pannerService;

    @ResponseBody
    @RequestMapping("/selectPanner")
    public Response selectPanner(){
        Map<String ,Object> map=new HashMap<>();
        int sign=1;
        List<Panner> pannersList= pannerService.selectPanners(sign);
        map.put("pannersList",pannersList);
        return  new Response(MessageConstants.MSG_SUCCESS,map,"");
    }
}
